package me.heyclock.hl.recordwriter.activity;

import android.os.Bundle;

import butterknife.ButterKnife;
import me.heyclock.hl.recordwriter.R;
import me.heyclock.hl.recordwriter.app.BaseSwipeBackActivity;
import me.heyclock.hl.recordwriter.controller.LoginControlContract;
import me.heyclock.hl.recordwriter.controller.presenter.LoginControlPresenter;
import me.heyclock.hl.recordwriter.robot.ActivityStack;

public class LoginActivity extends BaseSwipeBackActivity implements LoginControlContract.View{

    /**
     * 请求服务
     */
    private LoginControlContract.Presenter presenter = null;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);
        ///< 绑定注解
        ButterKnife.bind(this);
        ActivityStack.addActivity(LoginActivity.this);
        initView();
        initService();
    }

    /**
     * 初始化界面
     */
    private void initView() {
        ///< 初始化进度条
        setStateView(this);
    }

    /**
     * 初始化服务
     */
    private void initService() {
        presenter = new LoginControlPresenter(this);
    }

    /**
     * 登录成功回调
     */
    @Override
    public void loginOnSuccess() {

    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        ActivityStack.removeActivty();
    }
}
